from PySide6.QtCore import Slot
from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton, QVBoxLayout, QWidget
from layoutWin2 import Ui_MainWindow
import sys

class LayoutDemo(QMainWindow, Ui_MainWindow):
    """
    Class documentation goes here.
    """
    def __init__(self, parent=None):
        """
        Constructor
        """
        super(LayoutDemo, self).__init__(parent)
        self.setupUi(self)
    @Slot()
    def on_pushButton_clicked(self):
        """
        Slot documentation goes here.
        """
        print("Button clicked")
        # 假设 doubleSpinBox 和 doubleSpinBox_4 对应收益的最小和最大值
        print('收益_min:', self.doubleSpinBox.text())
        print('收益_max:', self.doubleSpinBox_4.text())
        # 假设 doubleSpinBox_2 和 doubleSpinBox_5 对应最大回撤的最小和最大值
        print('最大回撤_min:', self.doubleSpinBox_2.text())
        print('最大回撤_max:', self.doubleSpinBox_5.text())
        # 假设 doubleSpinBox_3 和 doubleSpinBox_6 对应夏普比的最小和最大值
        print('sharp比_min:', self.doubleSpinBox_3.text())
        print('sharp比_max:', self.doubleSpinBox_6.text())

if __name__ == '__main__':
    app = QApplication(sys.argv)
    window = LayoutDemo()
    window.show()
    sys.exit(app.exec())